package cn.jinjimi.app.bean;

import cn.jinjimi.app.main.activity.LoginActivity;
import cn.jinjimi.app.main.activity.MainActivity;
import cn.jinjimi.app.main.activity.ProfilesActivity;
import cn.jinjimi.app.main.activity.ReaderDetailActivity;
import cn.jinjimi.app.main.activity.SimpleProductSearchActivity;
import cn.jinjimi.app.main.activity.WebActivity;
import cn.jinjimi.app.poster.activity.PosterListActivity;
import cn.jinjimi.app.poster.activity.ReaderActivity;
import cn.jinjimi.app.webview.event.ReqLogoutEvent;
import cn.jinjimi.app.webview.event.Route2CustomerService;
import cn.jinjimi.framework.router.annotations.Direct;
import cn.jinjimi.framework.router.annotations.EventRoute;
import cn.jinjimi.framework.router.annotations.Route;

/**
 * 路由的常用变量
 * <p/>
 *
 * @author jinsen
 * @date 15/9/15
 */
public class RouterConstants {

    @EventRoute(ReqLogoutEvent.class)
    public static final String LOG_OUT = "logout";

    @Route(activity = WebActivity.class)
    public static final String ROUTER_WEB = "web";

    @Route(activity = MainActivity.class)
    public static final String MAIN_INDEX = "main/index";

    @Direct("main/index?position=1")
    public static final String HOME = "home";

    @Route(activity = PosterListActivity.class)
    public static final String POSTER_LIST = "post/list";

    @Route(activity = SimpleProductSearchActivity.class)
    public static final String PRODUCT_SEARCH = "search";

    @Route(activity = ReaderDetailActivity.class)
    public static final String ReaderArticle = "reader/article";

    @Route(activity = ReaderActivity.class)
    public static final String ReaderIndex = "reader/index";

    @Route(activity = LoginActivity.class)
    public static final String LOGIN = "login";

    @Route(activity = ProfilesActivity.class, limit = true)
    public static final String MeProfile = "me/profile";

    @Direct("crm/main")
    public static final String CrmIndex = "crm/index";
    public static final String CATEGORY = "product/category";

    @EventRoute(Route2CustomerService.class)
    public static final String CUSTOMER_SERVICE = "customerService";

    @Route(activity = WebActivity.class)
    public static final String ROUTER_LOAD_WEB_PAGE = "loadWebPage";

    public static String getNativeRouter(String target) {
        return RouterService.ROUTER_HEADER + target;
    }

}